/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'central';
  
  checkConfig(config);
  @endpoint = getEndpoint('cassandra', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AllocatePublicContactPointsRequest {
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model AllocatePublicContactPointsResponseBody = {
  requestId?: string(name='RequestId'),
}

model AllocatePublicContactPointsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AllocatePublicContactPointsResponseBody(name='body'),
}

async function allocatePublicContactPointsWithOptions(request: AllocatePublicContactPointsRequest, runtime: Util.RuntimeOptions): AllocatePublicContactPointsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllocatePublicContactPoints',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function allocatePublicContactPoints(request: AllocatePublicContactPointsRequest): AllocatePublicContactPointsResponse {
  var runtime = new Util.RuntimeOptions{};
  return allocatePublicContactPointsWithOptions(request, runtime);
}

model CreateBackupPlanRequest {
  active?: boolean(name='Active'),
  backupPeriod?: string(name='BackupPeriod'),
  backupTime?: string(name='BackupTime'),
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  retentionPeriod?: int32(name='RetentionPeriod'),
}

model CreateBackupPlanResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateBackupPlanResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateBackupPlanResponseBody(name='body'),
}

async function createBackupPlanWithOptions(request: CreateBackupPlanRequest, runtime: Util.RuntimeOptions): CreateBackupPlanResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.active)) {
    query['Active'] = request.active;
  }
  if (!Util.isUnset(request.backupPeriod)) {
    query['BackupPeriod'] = request.backupPeriod;
  }
  if (!Util.isUnset(request.backupTime)) {
    query['BackupTime'] = request.backupTime;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.retentionPeriod)) {
    query['RetentionPeriod'] = request.retentionPeriod;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBackupPlan',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createBackupPlan(request: CreateBackupPlanRequest): CreateBackupPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBackupPlanWithOptions(request, runtime);
}

model CreateClusterRequest {
  autoRenew?: boolean(name='AutoRenew'),
  autoRenewPeriod?: int32(name='AutoRenewPeriod'),
  clientToken?: string(name='ClientToken'),
  clusterName?: string(name='ClusterName'),
  dataCenterName?: string(name='DataCenterName'),
  diskSize?: int32(name='DiskSize'),
  diskType?: string(name='DiskType'),
  instanceType?: string(name='InstanceType'),
  majorVersion?: string(name='MajorVersion'),
  nodeCount?: int32(name='NodeCount'),
  password?: string(name='Password'),
  payType?: string(name='PayType'),
  period?: int32(name='Period'),
  periodUnit?: string(name='PeriodUnit'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  vpcId?: string(name='VpcId'),
  vswitchId?: string(name='VswitchId'),
  zoneId?: string(name='ZoneId'),
}

model CreateClusterResponseBody = {
  clusterId?: string(name='ClusterId'),
  requestId?: string(name='RequestId'),
}

model CreateClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateClusterResponseBody(name='body'),
}

async function createClusterWithOptions(request: CreateClusterRequest, runtime: Util.RuntimeOptions): CreateClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.autoRenewPeriod)) {
    query['AutoRenewPeriod'] = request.autoRenewPeriod;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.dataCenterName)) {
    query['DataCenterName'] = request.dataCenterName;
  }
  if (!Util.isUnset(request.diskSize)) {
    query['DiskSize'] = request.diskSize;
  }
  if (!Util.isUnset(request.diskType)) {
    query['DiskType'] = request.diskType;
  }
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.majorVersion)) {
    query['MajorVersion'] = request.majorVersion;
  }
  if (!Util.isUnset(request.nodeCount)) {
    query['NodeCount'] = request.nodeCount;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.period)) {
    query['Period'] = request.period;
  }
  if (!Util.isUnset(request.periodUnit)) {
    query['PeriodUnit'] = request.periodUnit;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCluster',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCluster(request: CreateClusterRequest): CreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterWithOptions(request, runtime);
}

model CreateDataCenterRequest {
  autoRenew?: boolean(name='AutoRenew'),
  autoRenewPeriod?: int32(name='AutoRenewPeriod'),
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId'),
  dataCenterName?: string(name='DataCenterName'),
  diskSize?: int32(name='DiskSize'),
  diskType?: string(name='DiskType'),
  instanceType?: string(name='InstanceType'),
  nodeCount?: int32(name='NodeCount'),
  payType?: string(name='PayType'),
  period?: int32(name='Period'),
  periodUnit?: string(name='PeriodUnit'),
  regionId?: string(name='RegionId'),
  vpcId?: string(name='VpcId'),
  vswitchId?: string(name='VswitchId'),
  zoneId?: string(name='ZoneId'),
}

model CreateDataCenterResponseBody = {
  dataCenterId?: string(name='DataCenterId'),
  requestId?: string(name='RequestId'),
}

model CreateDataCenterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDataCenterResponseBody(name='body'),
}

async function createDataCenterWithOptions(request: CreateDataCenterRequest, runtime: Util.RuntimeOptions): CreateDataCenterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.autoRenewPeriod)) {
    query['AutoRenewPeriod'] = request.autoRenewPeriod;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterName)) {
    query['DataCenterName'] = request.dataCenterName;
  }
  if (!Util.isUnset(request.diskSize)) {
    query['DiskSize'] = request.diskSize;
  }
  if (!Util.isUnset(request.diskType)) {
    query['DiskType'] = request.diskType;
  }
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.nodeCount)) {
    query['NodeCount'] = request.nodeCount;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.period)) {
    query['Period'] = request.period;
  }
  if (!Util.isUnset(request.periodUnit)) {
    query['PeriodUnit'] = request.periodUnit;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDataCenter',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDataCenter(request: CreateDataCenterRequest): CreateDataCenterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDataCenterWithOptions(request, runtime);
}

model DeleteBackupPlanRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model DeleteBackupPlanResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteBackupPlanResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteBackupPlanResponseBody(name='body'),
}

async function deleteBackupPlanWithOptions(request: DeleteBackupPlanRequest, runtime: Util.RuntimeOptions): DeleteBackupPlanResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBackupPlan',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteBackupPlan(request: DeleteBackupPlanRequest): DeleteBackupPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBackupPlanWithOptions(request, runtime);
}

model DeleteClusterRequest {
  clusterId?: string(name='ClusterId'),
}

model DeleteClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteClusterResponseBody(name='body'),
}

async function deleteClusterWithOptions(request: DeleteClusterRequest, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCluster(request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterWithOptions(request, runtime);
}

model DeleteDataCenterRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model DeleteDataCenterResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteDataCenterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDataCenterResponseBody(name='body'),
}

async function deleteDataCenterWithOptions(request: DeleteDataCenterRequest, runtime: Util.RuntimeOptions): DeleteDataCenterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataCenter',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDataCenter(request: DeleteDataCenterRequest): DeleteDataCenterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDataCenterWithOptions(request, runtime);
}

model DeleteNodeToolExecutionHistoryRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  jobId?: string(name='JobId'),
}

model DeleteNodeToolExecutionHistoryResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteNodeToolExecutionHistoryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteNodeToolExecutionHistoryResponseBody(name='body'),
}

async function deleteNodeToolExecutionHistoryWithOptions(request: DeleteNodeToolExecutionHistoryRequest, runtime: Util.RuntimeOptions): DeleteNodeToolExecutionHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteNodeToolExecutionHistory',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteNodeToolExecutionHistory(request: DeleteNodeToolExecutionHistoryRequest): DeleteNodeToolExecutionHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNodeToolExecutionHistoryWithOptions(request, runtime);
}

model DescribeAccountsRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeAccountsResponseBody = {
  accounts?: {
    account?: [ 
    {
      name?: string(name='Name'),
    }
  ](name='Account')
  }(name='Accounts'),
  requestId?: string(name='RequestId'),
}

model DescribeAccountsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAccountsResponseBody(name='body'),
}

async function describeAccountsWithOptions(request: DescribeAccountsRequest, runtime: Util.RuntimeOptions): DescribeAccountsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccounts',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAccounts(request: DescribeAccountsRequest): DescribeAccountsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccountsWithOptions(request, runtime);
}

model DescribeBackupRequest {
  backupId?: string(name='BackupId'),
  backupType?: string(name='BackupType'),
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model DescribeBackupResponseBody = {
  backup?: {
    backupId?: string(name='BackupId'),
    backupType?: string(name='BackupType'),
    clusterId?: string(name='ClusterId'),
    dataCenterId?: string(name='DataCenterId'),
    details?: string(name='Details'),
    endTime?: string(name='EndTime'),
    size?: long(name='Size'),
    startTime?: string(name='StartTime'),
    status?: string(name='Status'),
  }(name='Backup'),
  requestId?: string(name='RequestId'),
}

model DescribeBackupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeBackupResponseBody(name='body'),
}

async function describeBackupWithOptions(request: DescribeBackupRequest, runtime: Util.RuntimeOptions): DescribeBackupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backupId)) {
    query['BackupId'] = request.backupId;
  }
  if (!Util.isUnset(request.backupType)) {
    query['BackupType'] = request.backupType;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackup',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeBackup(request: DescribeBackupRequest): DescribeBackupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupWithOptions(request, runtime);
}

model DescribeBackupPlanRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model DescribeBackupPlanResponseBody = {
  backupPlan?: {
    active?: boolean(name='Active'),
    backupPeriod?: string(name='BackupPeriod'),
    backupTime?: string(name='BackupTime'),
    clusterId?: string(name='ClusterId'),
    createdTime?: string(name='CreatedTime'),
    dataCenterId?: string(name='DataCenterId'),
    retentionPeriod?: int32(name='RetentionPeriod'),
  }(name='BackupPlan'),
  requestId?: string(name='RequestId'),
}

model DescribeBackupPlanResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeBackupPlanResponseBody(name='body'),
}

async function describeBackupPlanWithOptions(request: DescribeBackupPlanRequest, runtime: Util.RuntimeOptions): DescribeBackupPlanResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackupPlan',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeBackupPlan(request: DescribeBackupPlanRequest): DescribeBackupPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupPlanWithOptions(request, runtime);
}

model DescribeBackupPlansRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeBackupPlansResponseBody = {
  backupPlans?: {
    backupPlan?: [ 
    {
      active?: boolean(name='Active'),
      backupPeriod?: string(name='BackupPeriod'),
      backupTime?: string(name='BackupTime'),
      clusterId?: string(name='ClusterId'),
      createdTime?: string(name='CreatedTime'),
      dataCenterId?: string(name='DataCenterId'),
      retentionPeriod?: int32(name='RetentionPeriod'),
    }
  ](name='BackupPlan')
  }(name='BackupPlans'),
  requestId?: string(name='RequestId'),
}

model DescribeBackupPlansResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeBackupPlansResponseBody(name='body'),
}

async function describeBackupPlansWithOptions(request: DescribeBackupPlansRequest, runtime: Util.RuntimeOptions): DescribeBackupPlansResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackupPlans',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeBackupPlans(request: DescribeBackupPlansRequest): DescribeBackupPlansResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupPlansWithOptions(request, runtime);
}

model DescribeBackupsRequest {
  backupType?: string(name='BackupType'),
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model DescribeBackupsResponseBody = {
  backups?: {
    backup?: [ 
    {
      backupId?: string(name='BackupId'),
      backupType?: string(name='BackupType'),
      clusterId?: string(name='ClusterId'),
      dataCenterId?: string(name='DataCenterId'),
      endTime?: string(name='EndTime'),
      size?: long(name='Size'),
      startTime?: string(name='StartTime'),
      status?: string(name='Status'),
    }
  ](name='Backup')
  }(name='Backups'),
  requestId?: string(name='RequestId'),
}

model DescribeBackupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeBackupsResponseBody(name='body'),
}

async function describeBackupsWithOptions(request: DescribeBackupsRequest, runtime: Util.RuntimeOptions): DescribeBackupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backupType)) {
    query['BackupType'] = request.backupType;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackups',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeBackups(request: DescribeBackupsRequest): DescribeBackupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupsWithOptions(request, runtime);
}

model DescribeClusterRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeClusterResponseBody = {
  cluster?: {
    autoRenewPeriod?: int32(name='AutoRenewPeriod'),
    autoRenewal?: boolean(name='AutoRenewal'),
    clusterId?: string(name='ClusterId'),
    clusterName?: string(name='ClusterName'),
    createdTime?: string(name='CreatedTime'),
    dataCenterCount?: int32(name='DataCenterCount'),
    expireTime?: string(name='ExpireTime'),
    isLatestVersion?: boolean(name='IsLatestVersion'),
    lockMode?: string(name='LockMode'),
    maintainEndTime?: string(name='MaintainEndTime'),
    maintainStartTime?: string(name='MaintainStartTime'),
    majorVersion?: string(name='MajorVersion'),
    minorVersion?: string(name='MinorVersion'),
    payType?: string(name='PayType'),
    resourceGroupId?: string(name='ResourceGroupId'),
    status?: string(name='Status'),
    tags?: {
      tag?: [ 
      {
        key?: string(name='Key'),
        value?: string(name='Value'),
      }
    ](name='Tag')
    }(name='Tags'),
  }(name='Cluster'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeClusterResponseBody(name='body'),
}

async function describeClusterWithOptions(request: DescribeClusterRequest, runtime: Util.RuntimeOptions): DescribeClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCluster',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCluster(request: DescribeClusterRequest): DescribeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterWithOptions(request, runtime);
}

model DescribeClusterDashboardRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeClusterDashboardResponseBody = {
  dashboard?: {
    clusterId?: string(name='ClusterId'),
    dataCenters?: {
      dataCenter?: [ 
      {
        dataCenterId?: string(name='DataCenterId'),
        nodes?: {
          node?: [ 
          {
            address?: string(name='Address'),
            load?: string(name='Load'),
            status?: string(name='Status'),
          }
        ](name='Node')
        }(name='Nodes'),
      }
    ](name='DataCenter')
    }(name='DataCenters'),
  }(name='Dashboard'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterDashboardResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeClusterDashboardResponseBody(name='body'),
}

async function describeClusterDashboardWithOptions(request: DescribeClusterDashboardRequest, runtime: Util.RuntimeOptions): DescribeClusterDashboardResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterDashboard',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterDashboard(request: DescribeClusterDashboardRequest): DescribeClusterDashboardResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterDashboardWithOptions(request, runtime);
}

model DescribeClusterStatusRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeClusterStatusResponseBody = {
  createdTime?: string(name='CreatedTime'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
}

model DescribeClusterStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeClusterStatusResponseBody(name='body'),
}

async function describeClusterStatusWithOptions(request: DescribeClusterStatusRequest, runtime: Util.RuntimeOptions): DescribeClusterStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterStatus',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterStatus(request: DescribeClusterStatusRequest): DescribeClusterStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterStatusWithOptions(request, runtime);
}

model DescribeClustersRequest {
  clusterName?: string(name='ClusterName'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model DescribeClustersResponseBody = {
  clusters?: {
    cluster?: [ 
    {
      autoRenewPeriod?: int32(name='AutoRenewPeriod'),
      autoRenewal?: boolean(name='AutoRenewal'),
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      createdTime?: string(name='CreatedTime'),
      dataCenterCount?: int32(name='DataCenterCount'),
      expireTime?: string(name='ExpireTime'),
      lockMode?: string(name='LockMode'),
      majorVersion?: string(name='MajorVersion'),
      minorVersion?: string(name='MinorVersion'),
      payType?: string(name='PayType'),
      resourceGroupId?: string(name='ResourceGroupId'),
      status?: string(name='Status'),
      tags?: {
        tag?: [ 
        {
          key?: string(name='Key'),
          value?: string(name='Value'),
        }
      ](name='Tag')
      }(name='Tags'),
    }
  ](name='Cluster')
  }(name='Clusters'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeClustersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeClustersResponseBody(name='body'),
}

async function describeClustersWithOptions(request: DescribeClustersRequest, runtime: Util.RuntimeOptions): DescribeClustersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusters',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusters(request: DescribeClustersRequest): DescribeClustersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClustersWithOptions(request, runtime);
}

model DescribeContactPointsRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeContactPointsResponseBody = {
  contactPoints?: {
    contactPoint?: [ 
    {
      dataCenterId?: string(name='DataCenterId'),
      port?: int32(name='Port'),
      privateAddresses?: {
        privateAddress?: [ string ](name='PrivateAddress')
      }(name='PrivateAddresses'),
      publicAddresses?: {
        publicAddress?: [ string ](name='PublicAddress')
      }(name='PublicAddresses'),
    }
  ](name='ContactPoint')
  }(name='ContactPoints'),
  requestId?: string(name='RequestId'),
}

model DescribeContactPointsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeContactPointsResponseBody(name='body'),
}

async function describeContactPointsWithOptions(request: DescribeContactPointsRequest, runtime: Util.RuntimeOptions): DescribeContactPointsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeContactPoints',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeContactPoints(request: DescribeContactPointsRequest): DescribeContactPointsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeContactPointsWithOptions(request, runtime);
}

model DescribeDataCenterRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model DescribeDataCenterResponseBody = {
  autoRenewPeriod?: int32(name='AutoRenewPeriod'),
  autoRenewal?: boolean(name='AutoRenewal'),
  clusterId?: string(name='ClusterId'),
  commodityInstance?: string(name='CommodityInstance'),
  createdTime?: string(name='CreatedTime'),
  dataCenterId?: string(name='DataCenterId'),
  dataCenterName?: string(name='DataCenterName'),
  diskSize?: int32(name='DiskSize'),
  diskType?: string(name='DiskType'),
  expireTime?: string(name='ExpireTime'),
  instanceType?: string(name='InstanceType'),
  lockMode?: string(name='LockMode'),
  nodeCount?: int32(name='NodeCount'),
  payType?: string(name='PayType'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
  vpcId?: string(name='VpcId'),
  vswitchId?: string(name='VswitchId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeDataCenterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDataCenterResponseBody(name='body'),
}

async function describeDataCenterWithOptions(request: DescribeDataCenterRequest, runtime: Util.RuntimeOptions): DescribeDataCenterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataCenter',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDataCenter(request: DescribeDataCenterRequest): DescribeDataCenterResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataCenterWithOptions(request, runtime);
}

model DescribeDataCentersRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeDataCentersResponseBody = {
  dataCenters?: {
    dataCenter?: [ 
    {
      autoRenewPeriod?: int32(name='AutoRenewPeriod'),
      autoRenewal?: boolean(name='AutoRenewal'),
      clusterId?: string(name='ClusterId'),
      commodityInstance?: string(name='CommodityInstance'),
      createdTime?: string(name='CreatedTime'),
      dataCenterId?: string(name='DataCenterId'),
      dataCenterName?: string(name='DataCenterName'),
      diskSize?: int32(name='DiskSize'),
      diskType?: string(name='DiskType'),
      expireTime?: string(name='ExpireTime'),
      instanceType?: string(name='InstanceType'),
      lockMode?: string(name='LockMode'),
      nodeCount?: int32(name='NodeCount'),
      payType?: string(name='PayType'),
      regionId?: string(name='RegionId'),
      status?: string(name='Status'),
      vpcId?: string(name='VpcId'),
      vswitchId?: string(name='VswitchId'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='DataCenter')
  }(name='DataCenters'),
  requestId?: string(name='RequestId'),
}

model DescribeDataCentersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDataCentersResponseBody(name='body'),
}

async function describeDataCentersWithOptions(request: DescribeDataCentersRequest, runtime: Util.RuntimeOptions): DescribeDataCentersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataCenters',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDataCenters(request: DescribeDataCentersRequest): DescribeDataCentersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataCentersWithOptions(request, runtime);
}

model DescribeDeletedClustersRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
}

model DescribeDeletedClustersResponseBody = {
  clusters?: {
    cluster?: [ 
    {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      createdTime?: string(name='CreatedTime'),
      dataCenterCount?: int32(name='DataCenterCount'),
      expireTime?: string(name='ExpireTime'),
      majorVersion?: string(name='MajorVersion'),
      minorVersion?: string(name='MinorVersion'),
      payType?: string(name='PayType'),
      status?: string(name='Status'),
    }
  ](name='Cluster')
  }(name='Clusters'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeDeletedClustersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDeletedClustersResponseBody(name='body'),
}

async function describeDeletedClustersWithOptions(request: DescribeDeletedClustersRequest, runtime: Util.RuntimeOptions): DescribeDeletedClustersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeletedClusters',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDeletedClusters(request: DescribeDeletedClustersRequest): DescribeDeletedClustersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeletedClustersWithOptions(request, runtime);
}

model DescribeInstanceTypeRequest {
  instanceType?: string(name='InstanceType'),
}

model DescribeInstanceTypeResponseBody = {
  instanceTypeSpecList?: {
    instanceTypeSpec?: [ 
    {
      cpuSize?: long(name='CpuSize'),
      instanceType?: string(name='InstanceType'),
      memSize?: long(name='MemSize'),
    }
  ](name='InstanceTypeSpec')
  }(name='InstanceTypeSpecList'),
  requestId?: string(name='RequestId'),
}

model DescribeInstanceTypeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeInstanceTypeResponseBody(name='body'),
}

async function describeInstanceTypeWithOptions(request: DescribeInstanceTypeRequest, runtime: Util.RuntimeOptions): DescribeInstanceTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceType',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeInstanceType(request: DescribeInstanceTypeRequest): DescribeInstanceTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceTypeWithOptions(request, runtime);
}

model DescribeIpWhitelistRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeIpWhitelistResponseBody = {
  ipList?: {
    IP?: [ string ](name='IP')
  }(name='IpList'),
  requestId?: string(name='RequestId'),
}

model DescribeIpWhitelistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeIpWhitelistResponseBody(name='body'),
}

async function describeIpWhitelistWithOptions(request: DescribeIpWhitelistRequest, runtime: Util.RuntimeOptions): DescribeIpWhitelistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIpWhitelist',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeIpWhitelist(request: DescribeIpWhitelistRequest): DescribeIpWhitelistResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIpWhitelistWithOptions(request, runtime);
}

model DescribeIpWhitelistGroupsRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeIpWhitelistGroupsResponseBody = {
  groups?: {
    group?: [ 
    {
      groupName?: string(name='GroupName'),
      ipList?: {
        IP?: [ string ](name='IP')
      }(name='IpList'),
      ipVersion?: int32(name='IpVersion'),
    }
  ](name='Group')
  }(name='Groups'),
  requestId?: string(name='RequestId'),
}

model DescribeIpWhitelistGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeIpWhitelistGroupsResponseBody(name='body'),
}

async function describeIpWhitelistGroupsWithOptions(request: DescribeIpWhitelistGroupsRequest, runtime: Util.RuntimeOptions): DescribeIpWhitelistGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIpWhitelistGroups',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeIpWhitelistGroups(request: DescribeIpWhitelistGroupsRequest): DescribeIpWhitelistGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIpWhitelistGroupsWithOptions(request, runtime);
}

model DescribeNodeToolExecutionHistoriesRequest {
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model DescribeNodeToolExecutionHistoriesResponseBody = {
  histories?: {
    history?: [ 
    {
      arguments?: string(name='Arguments'),
      command?: string(name='Command'),
      createTime?: long(name='CreateTime'),
      dataCenterId?: string(name='DataCenterId'),
      errorMessage?: string(name='ErrorMessage'),
      isEnded?: boolean(name='IsEnded'),
      jobId?: string(name='JobId'),
      modifyTime?: long(name='ModifyTime'),
      nodes?: string(name='Nodes'),
      regionId?: string(name='RegionId'),
    }
  ](name='History')
  }(name='Histories'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeNodeToolExecutionHistoriesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeNodeToolExecutionHistoriesResponseBody(name='body'),
}

async function describeNodeToolExecutionHistoriesWithOptions(request: DescribeNodeToolExecutionHistoriesRequest, runtime: Util.RuntimeOptions): DescribeNodeToolExecutionHistoriesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNodeToolExecutionHistories',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeNodeToolExecutionHistories(request: DescribeNodeToolExecutionHistoriesRequest): DescribeNodeToolExecutionHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNodeToolExecutionHistoriesWithOptions(request, runtime);
}

model DescribeNodeToolExecutionHistoryRequest {
  clusterId?: string(name='ClusterId'),
  dcId?: string(name='DcId'),
  jobId?: string(name='JobId'),
}

model DescribeNodeToolExecutionHistoryResponseBody = {
  arguments?: string(name='Arguments'),
  command?: string(name='Command'),
  createTime?: long(name='CreateTime'),
  dataCenterId?: string(name='DataCenterId'),
  errorMessage?: string(name='ErrorMessage'),
  isEnded?: boolean(name='IsEnded'),
  jobId?: string(name='JobId'),
  modifyTime?: long(name='ModifyTime'),
  nodes?: string(name='Nodes'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
  result?: string(name='Result'),
}

model DescribeNodeToolExecutionHistoryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeNodeToolExecutionHistoryResponseBody(name='body'),
}

async function describeNodeToolExecutionHistoryWithOptions(request: DescribeNodeToolExecutionHistoryRequest, runtime: Util.RuntimeOptions): DescribeNodeToolExecutionHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dcId)) {
    query['DcId'] = request.dcId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNodeToolExecutionHistory',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeNodeToolExecutionHistory(request: DescribeNodeToolExecutionHistoryRequest): DescribeNodeToolExecutionHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNodeToolExecutionHistoryWithOptions(request, runtime);
}

model DescribeParameterModificationHistoriesRequest {
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model DescribeParameterModificationHistoriesResponseBody = {
  histories?: {
    history?: [ 
    {
      name?: string(name='Name'),
      newValue?: string(name='NewValue'),
      oldValue?: string(name='OldValue'),
      time?: long(name='Time'),
    }
  ](name='History')
  }(name='Histories'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeParameterModificationHistoriesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeParameterModificationHistoriesResponseBody(name='body'),
}

async function describeParameterModificationHistoriesWithOptions(request: DescribeParameterModificationHistoriesRequest, runtime: Util.RuntimeOptions): DescribeParameterModificationHistoriesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeParameterModificationHistories',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeParameterModificationHistories(request: DescribeParameterModificationHistoriesRequest): DescribeParameterModificationHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeParameterModificationHistoriesWithOptions(request, runtime);
}

model DescribeParametersRequest {
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model DescribeParametersResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  parameters?: {
    parameter?: [ 
    {
      allowedValues?: string(name='AllowedValues'),
      dataType?: string(name='DataType'),
      defaultValue?: string(name='DefaultValue'),
      description?: string(name='Description'),
      name?: string(name='Name'),
      value?: string(name='Value'),
    }
  ](name='Parameter')
  }(name='Parameters'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeParametersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeParametersResponseBody(name='body'),
}

async function describeParametersWithOptions(request: DescribeParametersRequest, runtime: Util.RuntimeOptions): DescribeParametersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeParameters',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeParameters(request: DescribeParametersRequest): DescribeParametersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeParametersWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  acceptLanguage?: string(name='AcceptLanguage'),
}

model DescribeRegionsResponseBody = {
  regions?: {
    region?: [ 
    {
      localName?: string(name='LocalName'),
      regionEndpoint?: string(name='RegionEndpoint'),
      regionId?: string(name='RegionId'),
      zones?: {
        zone?: [ 
        {
          id?: string(name='Id'),
        }
      ](name='Zone')
      }(name='Zones'),
    }
  ](name='Region')
  }(name='Regions'),
  requestId?: string(name='RequestId'),
}

model DescribeRegionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRegionsResponseBody(name='body'),
}

async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.acceptLanguage)) {
    query['AcceptLanguage'] = request.acceptLanguage;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeSecurityGroupsRequest {
  clusterId?: string(name='ClusterId'),
}

model DescribeSecurityGroupsResponseBody = {
  requestId?: string(name='RequestId'),
  securityGroupIds?: {
    securityGroupId?: [ string ](name='SecurityGroupId')
  }(name='SecurityGroupIds'),
}

model DescribeSecurityGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeSecurityGroupsResponseBody(name='body'),
}

async function describeSecurityGroupsWithOptions(request: DescribeSecurityGroupsRequest, runtime: Util.RuntimeOptions): DescribeSecurityGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSecurityGroups',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeSecurityGroups(request: DescribeSecurityGroupsRequest): DescribeSecurityGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSecurityGroupsWithOptions(request, runtime);
}

model ExecuteNodeToolRequest {
  arguments?: string(name='Arguments'),
  clusterId?: string(name='ClusterId'),
  command?: string(name='Command'),
  dataCenterId?: string(name='DataCenterId'),
  executeNodes?: string(name='ExecuteNodes'),
}

model ExecuteNodeToolResponseBody = {
  requestId?: string(name='RequestId'),
}

model ExecuteNodeToolResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ExecuteNodeToolResponseBody(name='body'),
}

async function executeNodeToolWithOptions(request: ExecuteNodeToolRequest, runtime: Util.RuntimeOptions): ExecuteNodeToolResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.arguments)) {
    query['Arguments'] = request.arguments;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.command)) {
    query['Command'] = request.command;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.executeNodes)) {
    query['ExecuteNodes'] = request.executeNodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ExecuteNodeTool',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function executeNodeTool(request: ExecuteNodeToolRequest): ExecuteNodeToolResponse {
  var runtime = new Util.RuntimeOptions{};
  return executeNodeToolWithOptions(request, runtime);
}

model GetCmsUrlRequest {
  clusterId?: string(name='ClusterId'),
}

model GetCmsUrlResponseBody = {
  requestId?: string(name='RequestId'),
  url?: string(name='Url'),
}

model GetCmsUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetCmsUrlResponseBody(name='body'),
}

async function getCmsUrlWithOptions(request: GetCmsUrlRequest, runtime: Util.RuntimeOptions): GetCmsUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCmsUrl',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getCmsUrl(request: GetCmsUrlRequest): GetCmsUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCmsUrlWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken'),
  regionId?: string(name='RegionId'),
  resourceId?: [ string ](name='ResourceId'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
  tagResources?: {
    tagResource?: [ 
    {
      resourceId?: string(name='ResourceId'),
      resourceType?: string(name='ResourceType'),
      tagKey?: string(name='TagKey'),
      tagValue?: string(name='TagValue'),
    }
  ](name='TagResource')
  }(name='TagResources'),
}

model ListTagResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListTagResourcesResponseBody(name='body'),
}

async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ListTagsRequest {
  regionId?: string(name='RegionId'),
}

model ListTagsResponseBody = {
  requestId?: string(name='RequestId'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey'),
      tagValue?: string(name='TagValue'),
    }
  ](name='Tag')
  }(name='Tags'),
}

model ListTagsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListTagsResponseBody(name='body'),
}

async function listTagsWithOptions(request: ListTagsRequest, runtime: Util.RuntimeOptions): ListTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTags',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTags(request: ListTagsRequest): ListTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagsWithOptions(request, runtime);
}

model ModifyAccountPasswordRequest {
  account?: string(name='Account'),
  clusterId?: string(name='ClusterId'),
  password?: string(name='Password'),
}

model ModifyAccountPasswordResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyAccountPasswordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyAccountPasswordResponseBody(name='body'),
}

async function modifyAccountPasswordWithOptions(request: ModifyAccountPasswordRequest, runtime: Util.RuntimeOptions): ModifyAccountPasswordResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAccountPassword',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyAccountPassword(request: ModifyAccountPasswordRequest): ModifyAccountPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAccountPasswordWithOptions(request, runtime);
}

model ModifyBackupPlanRequest {
  active?: boolean(name='Active'),
  backupPeriod?: string(name='BackupPeriod'),
  backupTime?: string(name='BackupTime'),
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  retentionPeriod?: int32(name='RetentionPeriod'),
}

model ModifyBackupPlanResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyBackupPlanResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyBackupPlanResponseBody(name='body'),
}

async function modifyBackupPlanWithOptions(request: ModifyBackupPlanRequest, runtime: Util.RuntimeOptions): ModifyBackupPlanResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.active)) {
    query['Active'] = request.active;
  }
  if (!Util.isUnset(request.backupPeriod)) {
    query['BackupPeriod'] = request.backupPeriod;
  }
  if (!Util.isUnset(request.backupTime)) {
    query['BackupTime'] = request.backupTime;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.retentionPeriod)) {
    query['RetentionPeriod'] = request.retentionPeriod;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBackupPlan',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyBackupPlan(request: ModifyBackupPlanRequest): ModifyBackupPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBackupPlanWithOptions(request, runtime);
}

model ModifyClusterRequest {
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
}

model ModifyClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyClusterResponseBody(name='body'),
}

async function modifyClusterWithOptions(request: ModifyClusterRequest, runtime: Util.RuntimeOptions): ModifyClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCluster',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyCluster(request: ModifyClusterRequest): ModifyClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterWithOptions(request, runtime);
}

model ModifyDataCenterRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  dataCenterName?: string(name='DataCenterName'),
}

model ModifyDataCenterResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyDataCenterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyDataCenterResponseBody(name='body'),
}

async function modifyDataCenterWithOptions(request: ModifyDataCenterRequest, runtime: Util.RuntimeOptions): ModifyDataCenterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.dataCenterName)) {
    query['DataCenterName'] = request.dataCenterName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDataCenter',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyDataCenter(request: ModifyDataCenterRequest): ModifyDataCenterResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDataCenterWithOptions(request, runtime);
}

model ModifyInstanceMaintainTimeRequest {
  clusterId?: string(name='ClusterId'),
  maintainEndTime?: string(name='MaintainEndTime'),
  maintainStartTime?: string(name='MaintainStartTime'),
}

model ModifyInstanceMaintainTimeResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyInstanceMaintainTimeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyInstanceMaintainTimeResponseBody(name='body'),
}

async function modifyInstanceMaintainTimeWithOptions(request: ModifyInstanceMaintainTimeRequest, runtime: Util.RuntimeOptions): ModifyInstanceMaintainTimeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maintainEndTime)) {
    query['MaintainEndTime'] = request.maintainEndTime;
  }
  if (!Util.isUnset(request.maintainStartTime)) {
    query['MaintainStartTime'] = request.maintainStartTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyInstanceMaintainTime',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyInstanceMaintainTime(request: ModifyInstanceMaintainTimeRequest): ModifyInstanceMaintainTimeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyInstanceMaintainTimeWithOptions(request, runtime);
}

model ModifyInstanceTypeRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  instanceType?: string(name='InstanceType'),
}

model ModifyInstanceTypeResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyInstanceTypeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyInstanceTypeResponseBody(name='body'),
}

async function modifyInstanceTypeWithOptions(request: ModifyInstanceTypeRequest, runtime: Util.RuntimeOptions): ModifyInstanceTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyInstanceType',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyInstanceType(request: ModifyInstanceTypeRequest): ModifyInstanceTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyInstanceTypeWithOptions(request, runtime);
}

model ModifyIpWhitelistRequest {
  clusterId?: string(name='ClusterId'),
  ipList?: string(name='IpList'),
}

model ModifyIpWhitelistResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyIpWhitelistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyIpWhitelistResponseBody(name='body'),
}

async function modifyIpWhitelistWithOptions(request: ModifyIpWhitelistRequest, runtime: Util.RuntimeOptions): ModifyIpWhitelistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ipList)) {
    query['IpList'] = request.ipList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyIpWhitelist',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyIpWhitelist(request: ModifyIpWhitelistRequest): ModifyIpWhitelistResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIpWhitelistWithOptions(request, runtime);
}

model ModifyIpWhitelistGroupRequest {
  clusterId?: string(name='ClusterId'),
  groupName?: string(name='GroupName'),
  ipList?: string(name='IpList'),
  ipVersion?: int32(name='IpVersion'),
}

model ModifyIpWhitelistGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyIpWhitelistGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyIpWhitelistGroupResponseBody(name='body'),
}

async function modifyIpWhitelistGroupWithOptions(request: ModifyIpWhitelistGroupRequest, runtime: Util.RuntimeOptions): ModifyIpWhitelistGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.ipList)) {
    query['IpList'] = request.ipList;
  }
  if (!Util.isUnset(request.ipVersion)) {
    query['IpVersion'] = request.ipVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyIpWhitelistGroup',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyIpWhitelistGroup(request: ModifyIpWhitelistGroupRequest): ModifyIpWhitelistGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIpWhitelistGroupWithOptions(request, runtime);
}

model ModifyParameterRequest {
  clusterId?: string(name='ClusterId'),
  name?: string(name='Name'),
  value?: string(name='Value'),
}

model ModifyParameterResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyParameterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyParameterResponseBody(name='body'),
}

async function modifyParameterWithOptions(request: ModifyParameterRequest, runtime: Util.RuntimeOptions): ModifyParameterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyParameter',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyParameter(request: ModifyParameterRequest): ModifyParameterResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyParameterWithOptions(request, runtime);
}

model ModifySecurityGroupsRequest {
  clusterId?: string(name='ClusterId'),
  securityGroupIds?: string(name='SecurityGroupIds'),
}

model ModifySecurityGroupsResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifySecurityGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifySecurityGroupsResponseBody(name='body'),
}

async function modifySecurityGroupsWithOptions(request: ModifySecurityGroupsRequest, runtime: Util.RuntimeOptions): ModifySecurityGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.securityGroupIds)) {
    query['SecurityGroupIds'] = request.securityGroupIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySecurityGroups',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifySecurityGroups(request: ModifySecurityGroupsRequest): ModifySecurityGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySecurityGroupsWithOptions(request, runtime);
}

model MoveResourceGroupRequest {
  clusterId?: string(name='ClusterId'),
  newResourceGroupId?: string(name='NewResourceGroupId'),
}

model MoveResourceGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model MoveResourceGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: MoveResourceGroupResponseBody(name='body'),
}

async function moveResourceGroupWithOptions(request: MoveResourceGroupRequest, runtime: Util.RuntimeOptions): MoveResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.newResourceGroupId)) {
    query['NewResourceGroupId'] = request.newResourceGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'MoveResourceGroup',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function moveResourceGroup(request: MoveResourceGroupRequest): MoveResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return moveResourceGroupWithOptions(request, runtime);
}

model PurgeClusterRequest {
  clusterId?: string(name='ClusterId'),
}

model PurgeClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model PurgeClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PurgeClusterResponseBody(name='body'),
}

async function purgeClusterWithOptions(request: PurgeClusterRequest, runtime: Util.RuntimeOptions): PurgeClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PurgeCluster',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function purgeCluster(request: PurgeClusterRequest): PurgeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return purgeClusterWithOptions(request, runtime);
}

model RebootClusterRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model RebootClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model RebootClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RebootClusterResponseBody(name='body'),
}

async function rebootClusterWithOptions(request: RebootClusterRequest, runtime: Util.RuntimeOptions): RebootClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RebootCluster',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rebootCluster(request: RebootClusterRequest): RebootClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return rebootClusterWithOptions(request, runtime);
}

model ReleasePublicContactPointsRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
}

model ReleasePublicContactPointsResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleasePublicContactPointsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ReleasePublicContactPointsResponseBody(name='body'),
}

async function releasePublicContactPointsWithOptions(request: ReleasePublicContactPointsRequest, runtime: Util.RuntimeOptions): ReleasePublicContactPointsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleasePublicContactPoints',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function releasePublicContactPoints(request: ReleasePublicContactPointsRequest): ReleasePublicContactPointsResponse {
  var runtime = new Util.RuntimeOptions{};
  return releasePublicContactPointsWithOptions(request, runtime);
}

model ResizeDiskSizeRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  diskSize?: int32(name='DiskSize'),
}

model ResizeDiskSizeResponseBody = {
  requestId?: string(name='RequestId'),
}

model ResizeDiskSizeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ResizeDiskSizeResponseBody(name='body'),
}

async function resizeDiskSizeWithOptions(request: ResizeDiskSizeRequest, runtime: Util.RuntimeOptions): ResizeDiskSizeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.diskSize)) {
    query['DiskSize'] = request.diskSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResizeDiskSize',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resizeDiskSize(request: ResizeDiskSizeRequest): ResizeDiskSizeResponse {
  var runtime = new Util.RuntimeOptions{};
  return resizeDiskSizeWithOptions(request, runtime);
}

model ResizeNodeCountRequest {
  clusterId?: string(name='ClusterId'),
  dataCenterId?: string(name='DataCenterId'),
  nodeCount?: int32(name='NodeCount'),
}

model ResizeNodeCountResponseBody = {
  requestId?: string(name='RequestId'),
}

model ResizeNodeCountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ResizeNodeCountResponseBody(name='body'),
}

async function resizeNodeCountWithOptions(request: ResizeNodeCountRequest, runtime: Util.RuntimeOptions): ResizeNodeCountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dataCenterId)) {
    query['DataCenterId'] = request.dataCenterId;
  }
  if (!Util.isUnset(request.nodeCount)) {
    query['NodeCount'] = request.nodeCount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResizeNodeCount',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resizeNodeCount(request: ResizeNodeCountRequest): ResizeNodeCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return resizeNodeCountWithOptions(request, runtime);
}

model TagResourcesRequest {
  regionId?: string(name='RegionId'),
  resourceId?: [ string ](name='ResourceId'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model TagResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TagResourcesResponseBody(name='body'),
}

async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UnTagResourcesRequest {
  all?: boolean(name='All'),
  regionId?: string(name='RegionId'),
  resourceId?: [ string ](name='ResourceId'),
  tagKey?: [ string ](name='TagKey'),
}

model UnTagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model UnTagResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnTagResourcesResponseBody(name='body'),
}

async function unTagResourcesWithOptions(request: UnTagResourcesRequest, runtime: Util.RuntimeOptions): UnTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnTagResources',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unTagResources(request: UnTagResourcesRequest): UnTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return unTagResourcesWithOptions(request, runtime);
}

model UpgradeClusterVersionRequest {
  clusterId?: string(name='ClusterId'),
}

model UpgradeClusterVersionResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpgradeClusterVersionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpgradeClusterVersionResponseBody(name='body'),
}

async function upgradeClusterVersionWithOptions(request: UpgradeClusterVersionRequest, runtime: Util.RuntimeOptions): UpgradeClusterVersionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeClusterVersion',
    version = '2019-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function upgradeClusterVersion(request: UpgradeClusterVersionRequest): UpgradeClusterVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return upgradeClusterVersionWithOptions(request, runtime);
}

